cmake_minimum_required(VERSION 3.20)

project(
    engine
    LANGUAGES CXX C
    VERSION 0.0.1
    DESCRIPTION "a engine based on vulkan"
)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}-x64")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}-x64")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}-x64")

# Build Type
#[[set(ETTIN_ENGINE_DEBUG OFF)
if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
    set(ETTIN_ENGINE_DEBUG OFF)
else()
    set(ETTIN_ENGINE_DEBUG ON)
endif()
]]

# CMKAE_EXPORT_COMPILE_COMMANDS
if(NOT CMAKE_EXPORT_COMPILE_COMMANDS)
    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()

# Test
include(CMakeDependentOption)

find_package(Vulkan REQUIRED)

add_subdirectory(Ettin)
add_subdirectory(Sandbox)
